package cn.winwintech.Incense.exception;

import com.base.webapp.respm.ResException;

public class ResExceptionFactory {

	//// user token
	public static ResException tokenExpire() {
		return new ResException(10000, "令牌过期！");
	}

	public static ResException tokenInvalid() {
		return new ResException(10014, "无效令牌！");
	}

	//// 用户
	public static ResException userNotExist() {
		return new ResException(10100, "用户不存在！");
	}

	//// address
	public static ResException addresseeNotExist() {
		return new ResException(10200, "地址不存在");
	}

	public static ResException addresseeNotValid() {
		return new ResException(10300, "这个地址不是默认收货地址");
	}

	public static ResException addresseeNotYours() {
		return new ResException(10301, "不是你的收获地址");
	}

	//// app
	public static ResException appTypeNotExist() {
		return new ResException(10400, "app类型不存在！");
	}

	// 属性值
	public static ResException attributeValueNotMatch() {
		return new ResException(10500, "属性不匹配");
	}

	//// 钱包
	public static ResException balanceWalletLow() {
		return new ResException(10600, "余额账户不足！");
	}

	public static ResException notBalanceWallet() {
		return new ResException(10601, "不是余额账户！");
	}

	public static ResException walletWasUpdated() {
		return new ResException(10602, "已经更新过了余额账户！");
	}

	public static ResException walletTypeNotExist(int walletType) {
		return new ResException(10603, "钱包类型不存在：" + walletType);
	}

	public static ResException bankNotExist() {
		return new ResException(10800, "银行不存在！");
	}

	//// 购物车
	public static ResException cartDelete() {
		return new ResException(10900, "商品数量为1时不能再减少");
	}

	public static ResException cartGroupNotExist() {
		return new ResException(11000, "购物车没有这组商品");
	}

	public static ResException cartItemNotExist() {
		return new ResException(11100, "购物车已经没有此商品");
	}

	public static ResException cartNotExist() {
		return new ResException(11200, "所选购物车不存在");
	}

	public static ResException chargeInconsistent() {
		return new ResException(11300, "支付价格不一致！");
	}

	public static ResException couponAmountInconsistent() {
		return new ResException(11400, "优惠金额不一致！");
	}

	//// 商品评价
	public static ResException evalSocreTypeError() {
		return new ResException(11500, "评估类型错误");
	}

	public static ResException evaluationCountNotExist() {
		return new ResException(11600, "评价数不存在");
	}

	//// 商品收藏
	public static ResException favoriteNotExist() {
		return new ResException(11700, "收藏不存在！");
	}

	//// 推荐人
	public static ResException inviterNotExist() {
		return new ResException(11800, "推荐人不存在！");
	}

	//// 支付
	public static ResException noOrderWhenPay() {
		return new ResException(11900, "支付时没有选择订单！");
	}

	public static ResException noSuchPaymentType() {
		return new ResException(12000, "无此支付类型！");
	}

	public static ResException paymentInterfaceError() {
		return new ResException(12001, "支付接口调用错误！");
	}

	public static ResException paymentTypeError() {
		return new ResException(12002, "支付类型错误！");
	}

	public static ResException paymentNotEsixt() {
		return new ResException(12003, "支付单不存在！");
	}

	public static ResException paymentNotPaySuccess() {
		return new ResException(12004, "支付单已没有支付成功！");
	}

	public static ResException paymentNotPayingStatus() {
		return new ResException(12005, "支付单已不是待支付状态！");
	}

	public static ResException notO2OPayment() {
		return new ResException(12006, "不是O2O支付！");
	}

	//// 订单
	public static ResException notYourOrder() {
		return new ResException(12100, "这不是您的订单！");
	}

	public static ResException orderIdInvalid() {
		return new ResException(12200, "非法订单ID！");
	}

	public static ResException orderAlreadyNotPaying() {
		return new ResException(12300, "订单已经不是代支付状态！");
	}

	public static ResException orderItemAlreadyTradeSucess() {
		return new ResException(12400, "订单项已经交易成功！");
	}

	public static ResException pointsWalletLow() {
		return new ResException(12500, "积分账户不足！");
	}

	public static ResException orderNotRight() {
		return new ResException(12600, "订单状态不正确！");

	}

	// 配置文件
	public static ResException profileValid() {
		return new ResException(12400, "已生效资料不可修改！");
	}

	//// 商品
	public static ResException productClassAttributeValueNotExsit() {
		return new ResException(12500, "产品分类属性值不存在！");
	}

	public static ResException productClassAttributeValueNotMatch() {
		return new ResException(12501, "产品分类属性值不匹配！");
	}

	public static ResException productNotExist() {
		return new ResException(12600, "商品不存在！");
	}

	public static ResException productStockNotExist() {
		return new ResException(12601, "商品没库存！");
	}

	public static ResException productStockNotEnough() {
		return new ResException(12602, "商品库存不足！");
	}

	public static ResException shopNotExist() {
		return new ResException(12700, "店铺不存在！");
	}

	public static ResException shopProductNotExist() {
		return new ResException(12800, "商品不存在！");
	}

	public static ResException shopProductNull() {
		return new ResException(12900, "商品已经下架！");
	}

	public static ResException shopProductDel() {
		return new ResException(12900, "商品已经删除！");
	}

	public static ResException shopProductSelling() {
		return new ResException(13000, "商品已上架！");
	}

	//// 优惠 ------------------------------------------

	public static ResException userCouponCanNotUse() {
		return new ResException(13100, "优惠券不可使用！");
	}

	public static ResException userCouponError() {
		return new ResException(13200, "优惠券ID为空时不能使用优惠券！");
	}

	public static ResException userCouponNotExist() {
		return new ResException(13300, "优惠券不可使用！");
	}

	public static ResException eposApiException() {
		return new ResException(13400, "易保接口调用异常！");
	}

	public static Exception eposApiException(String msg) {
		return new ResException(13401, msg);
	}

	//// 佣金------------------------------------------

	public static ResException commissionWithUnPaidPayment() {
		return new ResException(13500, "未支付成功的支付单不能创建佣金!");
	}

	public static ResException commissionWithPaymentExist() {
		return new ResException(13501, "支付单对应的佣金已创建!");
	}

	public static ResException commissionHasBeenAllocated() {
		return new ResException(13502, "佣金已经被分配!");
	}
	
	public static ResException commissionNotExist() {
		return new ResException(13503, "佣金不存在!");
	}
	
	public static ResException missingParameter(String string) {
		return new ResException(14000, "缺少参数：" + string);
	}

	public static ResException productFavoriteNotNull() {
		return new ResException(13500, "已收藏该商品！");
	}

	public static ResException ShopFavoriteNotNull() {
		return new ResException(13600, "已收藏该商店！");
	}

	public static ResException districtNotExist() {
		return new ResException(13700, "地区不存在！");
	}

	public static ResException notSameOwner() {
		return new ResException(13800, "不是同一个所有者！");
	}

	public static ResException orderNotExist() {
		return new ResException(13900, "订单不存在！");
	}

	public static ResException orderItemDel() {
		return new ResException(14000, "订单项已经删除！");
	}

	public static ResException orderItemNotExist() {
		return new ResException(14000, "订单项不存在！");
	}

	public static ResException orderBuyerNotExist() {
		return new ResException(14100, "不是买家！");
	}

	public static ResException profitWalletTypeNotExist() {
		return new ResException(14200, "账单类型为空！");
	}

	public static ResException profitWalletChangeTypeNotExist() {
		return new ResException(14300, "账单变动类型为空！");
	}

	public static ResException orderBuyerShopNotExist() {
		return new ResException(14400, "不符合买家和卖家的条件！");
	}

	public static ResException orderStatusMismatching() {
		return new ResException(14500, "订单状态不是已完成或取消！");
	}

	public static ResException orderDelFromNotExist() {
		return new ResException(14600, "删除此单为true！");
	}

	public static ResException orderStatusError() {
		return new ResException(14700, "订单状态错误！");
	}

	public static ResException walletChangeNotExist() {
		return new ResException(14800, "账户改变不存在！");
	}

	public static ResException notYourWallet() {
		return new ResException(14801, "不是你的账户");
	}

	public static ResException soldCountError() {
		return new ResException(14900, "数量有误！");
	}

	public static ResException bankInfoNotExist() {
		return new ResException(15000, "bankInfo不存在");
	}

	public static ResException settleTypeNotExist() {
		return new ResException(16000, "结算类型不存在");
	}

	public static ResException settleStatusNotExist() {
		return new ResException(16001, "结算状态不存在");
	}

	public static ResException settleAmountError() {
		return new ResException(16001, "结算金额不在合理范围");
	}

	public static ResException bankInfoIsEmpty() {
		return new ResException(16002, "你的银行信息为空");
	}

	public static ResException orderItemEvaluatedNotExist() {
		return new ResException(16100, "订单项已评价");
	}

	public static ResException orderHasBeenEvaluated() {
		return new ResException(16100, "订单已评价");
	}





}
